<template>
	<view class="main">
		<u-navbar back-text="" slot="center" :autoBack="true" safeAreaInsetTop placeholder>
			<view slot="center" class="leftText">{{title}}</view>
		</u-navbar>
		<web-view :src="url"></web-view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			url:'',
			title:''
		}
	},
	onLoad(opt) {
		if(opt.type==1){
			this.url='https://manage.xgr.work/xieyi/hyxieyi.html';
			this.title="用户协议";
		}else if(opt.type==2){
			this.url='https://manage.xgr.work/xieyi/yinsixieyi.html';
			this.title="隐私协议";
		}else if(opt.type==3){
			this.url='https://manage.xgr.work/xieyi/fbxieyi.html';
			this.title="天下工人信息发布规则";
		}else if(opt.type==5){
			this.url='https://manage.xgr.work/xieyi/choujiangguize.html';
			this.title="天下工人抽奖活动规则";
		}
		uni.setNavigationBarTitle({
		    title: this.title
		});
	}
}	
</script>

<style>
</style>